package com.bxait.toymail.cart.vo;

import java.math.BigDecimal;
import java.util.List;

/*
@description: 具体的每一个购物项
@ClassName CartItem
@author Chen
@create 2023-04-29 22:00
@Version 1.0
*/
public class CartItem {
    // 商品skuID
    private Long skuId;
    // 是否选中,默认为是
    private Boolean check = true;
    // 购物项标题
    private String title;
    // 购物项图片
    private String image;
    // 商品属性
    private List<String> skuAttr;
    // 价格
    private BigDecimal price;
    // 数量
    private Integer count;
    // 总金额
    private BigDecimal totalPrice;

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Boolean getCheck() {
        return check;
    }

    public void setCheck(Boolean check) {
        this.check = check;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public List<String> getSkuAttr() {
        return skuAttr;
    }

    public void setSkuAttr(List<String> skuAttr) {
        this.skuAttr = skuAttr;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    /*
     * @param 
     * @==============History===============<br/>
     * @Description //   购物项的总价需要计算得出
     * @Date 2023/4/29 2023/4/29 
     * @Author < a href="2277411582@qq.com">chen</ a>
     * @return java.math.BigDecimal
     */
    public BigDecimal getTotalPrice() {
        return this.price.multiply(new BigDecimal("" + this.count));
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }
}
